<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<html>
<head>
<style>
	#left {float:padding:5px 5px 5px 5px;width:70%;}
   #right {float:right;width:25%;}
</style>
</head>
<body marginheight="0">
<div id="left" style="word-wrap : break-word;">
<h1>文章列表：</h1>
<form name="frm_order" method="post" action="listArticle.html">
文章搜索: <select name="o">
	<option value="0" <c:if test="${o=='0'}">Selected</c:if>>按新旧排序</option>
	<option value="1" <c:if test="${o=='1'}">Selected</c:if>>按热度排序</option>
	<option value="2" <c:if test="${o=='2'}">Selected</c:if>>按评论数排序</option>
	<option value="3" <c:if test="${o=='3'}">Selected</c:if>>按评价排序</option>
	<option value="4" <c:if test="${o=='4'}">Selected</c:if>>按名称排序</option>
</select> <select name="type">
	<option value="Article" <c:if test="${type=='Article'}">Selected</c:if>>所有文章</option>
	<option value="TechArticle"
		<c:if test="${type=='TechArticle'}">Selected</c:if>>技术文章</option>
	<option value="News" <c:if test="${type=='News'}">Selected</c:if>>新闻</option>
</select> <input type="text" name="title" id="search" value="${title}"></input> <input
	type="submit" value="搜索"></input></form>

共有文章${page.count}篇,每页显示${page.pageSize}条,当前显示
第${page.pageNum}页/共${page.pageCount}页&nbsp;&nbsp; <c:if
	test="${page.pageCount>1}">
	<c:forEach var="i" begin="1" end="${page.pageCount}" step="1">
		<c:choose>
			<c:when test="${i==page.pageNum}">${i}</c:when>
			<c:otherwise>
				<a
					href="listArticle.html?page=${i}&o=${o}&type=${type}&title=${title}">${i}</a>
			</c:otherwise>
		</c:choose>
	</c:forEach>
</c:if>

<table class=lst>
	<c:forEach items="${page.list}" var="article">
		<TR>
			<TD vAlign=top width=60><A href="user/${article.fans.name}">
			<IMG class=fansIcon src="${article.fans.icon}"></A></TD>
			<td>
			<h3><a href="viewArticle/${article.articleId}">${article.title}</a></h3>
			<img src="images/comment.gif"><a
				href="viewArticle/${article.articleId}">${article.commentCount}个评论</a>&nbsp;<img
				src="images/visit.gif">${article.hot}次访问&nbsp;相关标签
				 <span id="articleTags_${article.articleId}"> <c:forEach
				items="${article.tagSet}" var="tag">
				<a class=tag href="viewTag/${tag.tagId}">${tag.title}</a>&nbsp;&nbsp;
	   </c:forEach> </span> 
	   <%@  include file="/include/saveArticleStatus.jsp"%>
			<br>
			来自:${article.source}&nbsp;&nbsp;<br>
作者:${article.author}&nbsp;&nbsp;发表于:${article.publishDate}<br>
			<a href="user/${article.recomFans.name}">${article.recomFans.nickName}</a>&nbsp;最先收藏于&nbsp;${article.submitDate}<br>
			<p>${article.content}</p><br>
			</td>
		</TR>
	</c:forEach>
</table>
<div align="center" style="background-color:#FFFFFF;"><c:if
	test="${page.pageNum>1}">
	<a
		href="listArticle.html?page=${page.pageNum-1}&o=${o}&type=${type}&title=${title}">上一页</a>
</c:if> <c:if test="${page.pageCount>page.pageNum}">
	<a
		href="listArticle.html?page=${page.pageNum+1}&o=${o}&type=${type}&title=${title}">下一页</a>
</c:if></div></div>
<div id="right">
<div class="tips">文章目前有2种来源：<br>
一是用户提交的feed，系统每天自动读取这些feed并将新的日志入库，用户通过推荐 这些日志形成文章；<br>
二是用户在本网站发表文章，目前是直接入库，发表人和推荐人都是作者。<br>
小技巧:<br>
搜索使用标签完全匹配,比如"spring",查找有spring标签的文章,可以使用空格分割多个标签,比如"spring hibernate",
查找同时有spring和hibernate标签的文章.</div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-3349070857739197";
google_alternate_color = "FFFFFF";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_type = "text";
google_ad_channel ="1701351471";
//--></script> <script type="text/javascript"
	src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</body>
</html>
